﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using System;
using System.Linq.Expressions;
using NJamb.Parser.SpecificationBuilders.SubjectHas;
using NJamb.Parser.SpecificationBuilders.SubjectIs;
using NJamb.Specifications;
using Stile.Patterns.SelfDescribingPredicates;
#endregion

namespace NJamb.Parser.SpecificationBuilders
{
    public interface ISpecificationBuilder<TSubject, out TSpecifies> : ICanThrow<TSpecifies>
        where TSpecifies : class
    {
        TSpecifies Satisfies(ISelfDescribingPredicate<TSubject> selfDescribingPredicate);
        TSpecifies Satisfies(Expression<Func<TSubject, bool>> lambdaPredicate);
    }

    public interface ISpecificationBuilder<TSubject, out TSpecifies, out THas, out TIs> :
        ISpecificationBuilder<TSubject, TSpecifies>
        where THas : class, IFluentHas<TSubject, TSpecifies>
        where TIs : class, IFluentIs<TSubject, TSpecifies>
        where TSpecifies : class, ISpecification
    {
        THas Has { get; }
        TIs Is { get; }
    }
}
